#ifndef __EXPLODINGSPRITE_H
#define __EXPLODINGSPRITE_H

#include <vector>

#include "explosion.h"

using std::vector;

class ExplodingSprite : public Sprite
{
	public:
		ExplodingSprite(const Sprite&);
		~ExplodingSprite();
		virtual void draw() const;
		virtual void update(Uint32 ticks);
		Frame* makeChunkFrames(unsigned);
		void makeChunks(unsigned);
		unsigned int chunkCount() const { return chunks.size(); }
		unsigned int freeCount()  const { return freeList.size(); }
	private:
		SDL_Surface *screen;
		const Frame *frame;
		SDL_Surface *spriteSurface;
		std::vector<Explosion> chunks;
		std::vector<Explosion> freeList;

		Vector2f getNewVelocity() const;
		ExplodingSprite(const ExplodingSprite&);
		ExplodingSprite& operator=(const ExplodingSprite&);
};

#endif // !__EXPLODINGSPRITE_H
